<template>
  <div class="goods">
    <pageTalbe :tableConfig="tableConfig" pageName="goods">
      <template #image="{ row }">
        <el-image
          style="width: 60px; height: 60px"
          :src="row.imgUrl"
          :preview-src-list="[row.imgUrl]"
        >
        </el-image>
      </template>
      <template #oldPrice="{ row }">
        <span>￥{{ row.oldPrice }}</span>
      </template>
      <template #newPrice="{ row }">
        <span>￥{{ row.newPrice }}</span>
      </template>
    </pageTalbe>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import pageTalbe from '@/components/page-table'

import { tableConfig } from './table.config'

export default defineComponent({
  name: 'goods',
  components: {
    pageTalbe
  },
  setup() {
    return {
      tableConfig
    }
  }
})
</script>

<style scoped></style>
